package com.bawei.yangzongcai___chenmei.BaseAddter;

import android.content.Context;
import android.graphics.Color;

import com.yanyusong.y_divideritemdecoration.Y_Divider;
import com.yanyusong.y_divideritemdecoration.Y_DividerBuilder;
import com.yanyusong.y_divideritemdecoration.Y_DividerItemDecoration;

/**
 * create by ertu
 * create on 2021/7/14
 * description
 */
public class Dlisengyer extends Y_DividerItemDecoration {
    public Dlisengyer(Context context) {
        super(context);
    }

    @Override
    public Y_Divider getDivider(int itemPosition) {
        if (itemPosition%2==0)
        {
            return new Y_DividerBuilder()
                    .setTopSideLine(true, Color.YELLOW,2,0,0)
                    .setRightSideLine(true, Color.MAGENTA,2,0,0)
                    .setBottomSideLine(true, Color.GRAY,2,0,0)
                    .setLeftSideLine(true, Color.BLACK,2,0,0)
                    .create();
        }
        else
        {
            return new Y_DividerBuilder()
                    .setTopSideLine(true, Color.BLUE,1,0,0)
                    .setRightSideLine(true, Color.RED,1,0,0)
                    .setBottomSideLine(true, Color.TRANSPARENT,1,0,0)
                    .setLeftSideLine(true, Color.YELLOW,1,0,0)
                    .create();
        }

    }
}
